This application claims priority to British Patent Application No. 0809492.2 filed May 23, 2008, the entire contents of which is hereby incorporated by reference.
1. Field of the Invention
This invention relates to data processing systems. More particularly, this invention relates to data processing systems supporting virtualisation of a data processing apparatus.
2. Description of the Prior Art
It is known to provide host data processing systems which support the virtualisation of a data processing system. The scale of the differences between the host data processing system and the virtual data processing system can vary considerably. In some examples the virtual data processing system may be a slightly different version or implementation of a data processing apparatus having the same basic processor architecture as the host data processing apparatus. In another example, the virtual data processing apparatus may be completely different from the host data processing apparatus, e.g. a stack based Java virtual machine emulated by a RISC or CISC host data processing apparatus.
Within this field of virtualisation, it is often necessary to support virtual devices to give the illusion of a real hardware device to a guest operating system or program. These virtual devices are really provided by hypervisor software. A convenient way to support devices (both real and virtual) is that they are memory mapped and accesses to the devices take the form of loads or stores to the memory mapped addresses. When supporting virtual devices of the virtual data processing apparatus it is necessary to route accesses to virtual devices at these memory mapped addresses to the hypervisor software for handling. A known technique is to trap accesses to these memory locations by setting the corresponding memory region containing the memory mapped virtual devices to “Invalid” or “No access” and to arrange for the resulting exceptions to be routed to the hypervisor program.
A problem with this approach is the need to decode the instruction which was seeking to access the virtual device in order to emulate that access. A memory management unit (MMU) that will typically trigger the exception will also normally provide (or trigger the provision of) the address and read/write information associated with the access which is subject to the exception. Within a real environment this is normally sufficient to provide for efficient processing of the exception associated with the memory access.